#ifndef _SNS_XIAONEI_ADAPTER_H_
#define _SNS_XIAONEI_ADAPTER_H_

#include <stdint.h>
#include <string>
#include <map>
#include <boost/thread/shared_mutex.hpp>

namespace sns {

class TicketCache {
public:
  std::string Get(int32_t uid) const;
  void Set(int32_t uid, const std::string & session);
private:
  // TODO : add evict policy
  std::map<int32_t, std::string> sessions_;
  mutable boost::shared_mutex mutex_;
};

}

#endif // _SNS_XIAONEI_ADAPTER_H_
